#ifndef _TEXTURE_MANAGER_
#define _TEXTURE_MANAGER_

#include <map>
#include <string>
using namespace std;

typedef map<const char*, unsigned int> TextureList;

/**
	Scoped way of managing all textures that are loaded in.
	Merely call TextureManager::Instance().getTexture("mytexturefile") and it'll happen
	
	NOTE: Only handles targa images
*/
class TextureManager
{
public:
	static TextureManager& Instance();

	~TextureManager();

	/**
		Looks to see if the texture with that filename is already loaded.
		If so, return that texture, otherwise load it and return it.
	*/
	unsigned int getTexture(const char *filename);

private:
	// Hide these 'cause this is a singleton.
	TextureManager():textures() {}
	TextureManager(const TextureManager&o);
	TextureManager& operator = (const TextureManager&);

	// container for fonts
	TextureList textures;
};

#endif
